import Vue from 'vue'
import Router from 'vue-router'
import Cart from '@/components/tabber/cart'
import Search from '@/components/tabber/search'
import Home from '@/components/tabber/home'
import Contact from '@/components/tabber/contact'
import Newslist from '@/components/news/newslist'
import Newslifo from '../components/news/newsinfo.vue'
Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'Home',
      component: Home
    }, {
      path: '/home',
      name: 'Home',
      component: Home
      // children: [{
      //   path: 'newslist',
      //   name: 'Newslist',
      //   component: Newslist
      // }]

    },
    {
      path: '/home/newslist',
      name: 'Newslist',
      component: Newslist

    }
    ,
    {
      path: '/home/newsinfo/:id',
      name: 'Newslifo',
      component: Newslifo

    }
    ,
    {
      path: '/cart',
      name: 'Cart',
      component: Cart
    },
    {
      path: '/search',
      name: 'Search',
      component: Search
    }, {
      path: '/contact',
      name: 'Contact',
      component: Contact
    }
  ],
  //路由高亮显示
  linkActiveClass: 'mui-active'
})
